-
Notifications
You must be signed in to change notification settings - Fork 934
Add comments explaining suppressed warnings in api common #7951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add comments explaining suppressed warnings in api common #7951
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7951 +/- ##
============================================
- Coverage 90.14% 90.12% -0.03%
+ Complexity 7467 7465 -2
============================================
Files 834 834
Lines 22586 22586
Branches 2240 2240
============================================
- Hits 20360 20355 -5
- Misses 1527 1530 +3
- Partials 699 701 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| @Override | ||
| @SuppressWarnings({"unchecked", "rawtypes"}) | ||
| // Safe: Attributes guarantees iteration over matching AttributeKey<T> / value pairs. | ||
| // Raw types are used here to avoid additional allocations while copying entries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generic types don't survive into compiled code, so this has nothing to do with allocations that I know of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generic types don't survive into compiled code, so this has nothing to do with allocations that I know of.
Good catch, thanks for pointing that out. You're right, the allocation comment isn't accurate here. I'll update the comment to focus only on the type-safety guarantee.
|
Thank you for your contribution @Gosling-dude! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. |
|
It would be good to change the tooling to make sure an entire module is covered, e.g. by adding a property to the build file. |
Adds brief comments explaining why certain warnings are intentionally suppressed in the api common module.
No functional changes.
Fixes #7874.